# encoding:utf-8
'''
@author : xaing
@time : 2019/4/4 10:12
@地址 : 广州
@作用 : 最常用的基础方法
@结果 :
'''




def printStr(*object):
    '''
    对 print() 方法的封装
    :param object: 可以传入多个值 （参数1，参数2，参数3）
    :return:
    '''
    result = ''
    for index, obj in enumerate(object):
        result += str(object[index])

    print(result)

def outStr(*object):
    '''
    对 print() 方法的封装,返回字符串
    :param object: 可以传入多个值 （参数1，参数2，参数3）
    :return:
    '''
    result = ''
    for index, obj in enumerate(object):
        result += str(object[index])

    return result



def checkNull(string):
    '''
    判断是否为空
    :param string: 要检测的字符串
    :return: 是空返回true
    '''
    if typeOf(string) is not 'str':
        string = str(string)

    if (string is None) or (string is '') or (string is 'null') or (string is ' ') or (string is 'undefined'):
        return True
    else:
        return False


def typeOf(variate):
    '''
    判断变量类型的函数
    :param variate: 要判断的变量
    :return: 返回类型
    '''
    type = None
    if isinstance(variate,int):
        type = "int"

    elif isinstance(variate,str):
        type = "str"

    elif isinstance(variate,float):
        type = "float"

    elif isinstance(variate,list):
        type = "list"

    elif isinstance(variate,tuple):
        type = "tuple"

    elif isinstance(variate,dict):
        type = "dict"

    elif isinstance(variate,set):
        type = "set"

    return type


